package xin.de.weiauth.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import xin.de.weiauth.service.PushMessageService;

@RestController
@RequestMapping("/push")
public class PushMessageController{

    @Autowired
    private PushMessageService pushMessageService;

    @GetMapping("/quartz")
    public boolean quartzMessage(@RequestParam(name = "openId",defaultValue = "")String openId,
                                 @RequestParam(name = "date",defaultValue = "")String date,
                                 @RequestParam(name = "message",defaultValue = "")String message){
        boolean b = pushMessageService.pushQuartzMessage(openId, date, message);
        return b;
    }

}
